<%@ page language="java" contentType="text/html"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Registrieren</title>
<link href="css/login-box.css" rel="stylesheet" type="text/css" />

<script language="javascript" src="javascript/md5.js"></script>
<script language="javascript">
	function passResponse() {
		document.hform.name.value = document.register.user_temp.value;
		if (document.register.pass1_temp.value != ""
				&& document.register.pass2_temp.value != "") {
			document.hform.p1.value = MD5(document.register.pass1_temp.value
					+ document.register.user_temp.value);
			document.hform.p2.value = MD5(document.register.pass2_temp.value
					+ document.register.user_temp.value);
			document.register.pass1_temp.value = "";
			document.register.pass2_temp.value = "";
			document.hform.submit();
		}
	}
</script>
</head>
<body>

	<div style="padding: 100px 0 0 250px;">
		<div id="login-box">
			<H2>Registrieren</H2>
			<br /> <br />
			<div id="login-box-name" style="margin-top: 0px;">Name:</div>
			<form name="register">
				<div id="login-box-field" style="margin-top: 0px;">
					<input type="text" name="user_temp" class="form-login" value=""
						size="30" maxlength="40" />
				</div>
				<div id="login-box-name">Password:</div>
				<div id="login-box-field">
					<input name="pass1_temp" type="password" class="form-login"
						value="" size="30" maxlength="40" />
				</div>
				<div id="login-box-name">Password:</div>
				<div id="login-box-field">
					<input name="pass2_temp" type="password" class="form-login"
						value="" size="30" maxlength="40" />
				</div>
				<br>
			</form>

			<form action="Login" METHOD="GET" name="hform">
				<input type="hidden" name="name"> <input type="hidden"
					name="p1"> <input type="hidden" name="p2"> <input
					style="display: none" type="password" name="register" value="true"
					size="20" /> <input type="image" name="submitbtn"
					onClick="passResponse(); return false;"
					src="images/button_submit.png" width="103" height="42"
					style="margin-left: 90px;" />
			</form>

			<a href=Login><font color="yellow">Login</font>
			</a>
			<c:if test="${!empty errorMessage}">
				<font color="red"><b>${errorMessage}</b>
				</font>
			</c:if>
			<c:if test="${!empty info}">
				<b>${info}</b>
			</c:if>
			<br />
		</div>

	</div>

</body>
</html>